import request from '@/utils/request'
// 列表
export function GetListAPI(params) {
  return request({
    url: '/quality/quality-patrol-document/list',
    method: 'GET',
    params
  })
}

// 新增
export function AddDataAPI(data) {
  return request({
    url: '/quality/quality-patrol-document/add',
    method: 'POST',
    data
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/quality/quality-patrol-document/update',
    method: 'PUT',
    data
  })
}

// 查看
export function GetDetailsAPI(data) {
  return request({
    url: '/quality/quality-patrol-document/view/' + data,
    method: 'GET'
  })
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: '/quality/quality-patrol-document/delete/' + data,
    method: 'DELETE'
  })
}

// 下拉
export function GetSelAPI() {
  return request({
    url: '/system/modeling/getLine',
    method: 'GET'
  })
}

// 检验编辑 =======

// 查询物料号码
export function GetMaterialNumberAPI(params) {
  return request({
    url: '/quality/quality-patrol-temporary/getMaterialNumber',
    method: 'GET',
    params
  })
}

// 下方列表
export function GetSampleDownListAPI(params) {
  return request({
    url: '/quality/quality-patrol-document/getSampleDownList',
    method: 'GET',
    params
  })
}

// 右侧列表
export function GetSampleListAPI(params) {
  return request({
    url: '/quality/quality-patrol-bad-sample/list',
    method: 'GET',
    params
  })
}

// 右侧列表删除
export function DelSampleListAPI(params) {
  return request({
    url: '/quality/quality-patrol-bad-sample/delete/' + params,
    method: 'DELETE'
  })
}

// 小保存
export function AddSampleDataAPI(data) {
  return request({
    url: '/quality/quality-patrol-sample-information/add',
    method: 'POST',
    data
  })
}

// 保存
export function AddDocumentAPI(data) {
  return request({
    url: '/quality/quality-patrol-sample-information/addDocument',
    method: 'POST',
    data
  })
}

// 样本信息列表
export function GetInformationListAPI(params) {
  return request({
    url: '/quality/quality-patrol-sample-information/list',
    method: 'GET',
    params
  })
}

// 获取线别
export function GetLineCodeByRankAPI(data) {
  return request({
    url: '/quality/quality-shop-modeling/getLineCodeByRank/' + data,
    method: 'GET'
  })
}

// 指令单号批
export function GetOrderNumAPI(params) {
  return request({
    url: '/production/cut-orders-document/getOrderNum',
    method: 'GET',
    params
  })
}

// 通过制令单寻找检验单据
export function GetItemMessageAPI(params) {
  return request({
    url: '/quality/quality-patrol-document/getPatrolInspectionDocument',
    method: 'GET',
    params
  })
}
